<template>
  <a-tooltip>
    <template #title>
      <span>{{ t('system.refresh') }}</span>
    </template>
    <redo-outlined
      :style="{ fontSize: iconSize + 'px' }"
      @click="$emit('refresh')"
    />
  </a-tooltip>
</template>

<script lang="ts">
import { defineComponent, toRefs } from 'vue'
import { useI18n } from 'vue-i18n'
import { RedoOutlined } from '@ant-design/icons-vue'
export default defineComponent({
  name: 'RefreshSetting',
  components: { RedoOutlined },
  props: {
    iconSize: { type: Number, default: 20 }
  },
  setup(props) {
    const { t } = useI18n()
    return { t, ...toRefs(props) }
  }
})
</script>